﻿@model WishlistEmailAFriendModel
@inject IPageHeadBuilder pagebuilder
@{
    Layout = "_ColumnsOne";

    //title
    pagebuilder.AddTitleParts(T("PageTitle.WishlistEmailAFriend").Text);
}
<div class="page email-a-friend-page">
    <h2 class="h2 generalTitle text-xs-center">@T("Wishlist.EmailAFriend.Title")</h2>
    @if (Model.SuccessfullySent)
    {
        <div class="result">
            <div class="result card bg-info p-3 text-white">@Model.Result</div>
        </div>
    }
    else
    {
        <form asp-route="EmailWishlist" method="post">
            <div asp-validation-summary="ModelOnly" class="message-error"></div>
            <div class="form-fields">
                <div class="inputs pb-1">
                    <label class="col-form-label" asp-for="FriendEmail">@T("Wishlist.EmailAFriend.FriendEmail"):</label>
                    <input asp-for="FriendEmail" class="form-control friend-email" placeholder="@T("Wishlist.EmailAFriend.FriendEmail.Hint")" />
                    <span asp-validation-for="FriendEmail"></span>
                </div>
                <div class="inputs pb-1">
                    <label class="col-form-label" asp-for="YourEmailAddress">@T("Wishlist.EmailAFriend.YourEmailAddress"):</label>
                    <input asp-for="YourEmailAddress" class="form-control your-email" placeholder="@T("Wishlist.EmailAFriend.YourEmailAddress.Hint")" />
                    <span asp-validation-for="YourEmailAddress"></span>
                </div>
                <div class="inputs pb-1">
                    <label class="col-form-label" asp-for="PersonalMessage">@T("Wishlist.EmailAFriend.PersonalMessage"):</label>
                    <textarea asp-for="PersonalMessage" class="form-control personal-message" placeholder="@T("Wishlist.EmailAFriend.PersonalMessage.Hint")"></textarea>
                    <span asp-validation-for="PersonalMessage"></span>
                </div>
                @if (Model.DisplayCaptcha)
                {
                    <div class="captcha-box pb-1">
                        <captcha />
                    </div>
                }
            </div>
            <div class="btn-group mt-3">
                <input type="submit" name="send-email" class="btn btn-info send-email-a-friend-button" value="@T("Wishlist.EmailAFriend.Button")">
            </div>
        </form>
    }
</div>
